package com.skyz.wrap.utils;

import android.app.Activity;
import android.content.Intent;
import android.graphics.Bitmap;
import android.net.Uri;
import android.provider.MediaStore;

import java.util.Calendar;

public class ShareSystem {

    public static void shareText(Activity activity,String text){
        Intent intent = new Intent();
        intent.setAction(Intent.ACTION_SEND);
        intent.putExtra(Intent.EXTRA_TEXT, text);
        intent.setType("text/plain");
        activity.startActivity(intent);
    }

    public static void shareImage(Activity activity, Uri bitmapurl){
        Intent intent = new Intent();
        intent.setAction(Intent.ACTION_SEND);
         intent.setType("image/*");
        intent.putExtra(Intent.EXTRA_STREAM, bitmapurl);
        activity.startActivity(Intent.createChooser(intent, "海报"));
    }
}
